/* Firefox userChrome.css tweaks ********************************************************/
/* Github: https://github.com/aris-t2/customcssforfx ************************************/
/****************************************************************************************/


:is(.browserContainer, #viewSource) .findbar-container :is(spacer, .findbar-find-fast[anonid="match-case-status"]) {
  visibility: collapse;
}

:is(.browserContainer, #viewSource) .findbar-closebutton {
  padding: 0 !important;
  margin: 0 !important;
  margin-inline-end: 2px !important;
}

:is(.browserContainer, #viewSource) .findbar-closebutton  .toolbarbutton-icon{
  width: 16px !important;
  height: 16px !important;
}

:is(.browserContainer, #viewSource) .findbar-textbox {
  font-size: 14px !important;
}

:is(.browserContainer,#viewSource) :is(findbar,#FindToolbar) {
  order: -1 !important;
  margin-top: -1px !important;
  box-shadow: unset !important;
  border: 1px solid #e1e1e2 !important;
  border-top: 0px solid transparent !important;
  border-radius: 0 0 3px 3px;
  transition-property: visibility !important;
  /*background-image: unset !important;*/
}

:root[lwtheme] :is(.browserContainer,#viewSource) :is(findbar,#FindToolbar) {
  appearance: none !important;
  border: 1px solid var(--tabs-border-color) !important;
  border-top: 0px solid transparent !important;
  padding-block: 0 !important;
  border: unset !important;
}

:root[lwtheme] :is(.browserContainer,#viewSource) :is(findbar,#FindToolbar) .findbar-container {
  appearance: none !important;
  /*background-image: linear-gradient(to bottom, var(--toolbar-bgcolor),var(--toolbar-bgcolor)) !important;*/*/
  margin-inline-end: -26px !important;
  padding-inline-end: 26px !important;
  margin-inline-start: -26px !important;
  padding-inline-start: 26px !important;
}

:root[lwtheme] :is(.browserContainer,#viewSource) :is(findbar,#FindToolbar) .findbar-container hbox[anonid="findbar-textbox-wrapper"] {
  padding-inline-start: 8px;
}

:is(.browserContainer, #viewSource) :is(.findbar-find-status,.found-matches) {
  margin-inline-start: 4px !important;
  margin-inline-end: 4px !important;
  font-weight: bold !important;
}

:is(.browserContainer, #viewSource) .findbar-find-status {
  font-style: italic !important;
}

:root[lwtheme]:not(:-moz-lwtheme-brighttext) :is(.browserContainer, #viewSource) .findbar-find-status {
  color: red !important;
}

:root[lwtheme]:not(:-moz-lwtheme-brighttext) :is(.browserContainer, #viewSource) .found-matches {
  color: green !important;
}

:root[lwtheme]:-moz-lwtheme-brighttext :is(.browserContainer, #viewSource) :is(.findbar-find-status,.found-matches) {
  color: white !important;
}

@media (-moz-content-prefers-color-scheme: dark) {
	:root[lwtheme] :is(.browserContainer, #viewSource) :is(.findbar-find-status,.found-matches) {
	  color: white !important;
	}
}

.browserContainer > findbar > #findbar-close-container {
  background-color: unset !important;
}
